package com.yyd.designmodel.strategy;

import java.math.BigDecimal;

/**
 * 
* @ClassName: Apple 商品
* @Description: 需要打折的商品实现打折接口
* @author yuyidi
* @date 2015年5月26日 下午2:40:07*
 */
public class Apple implements Discountable{
	private double weight;
	private double price;
	private Discountor discountor;
	
	public Apple(double weight, double price, Discountor discountor) {
		super();
		this.weight = weight;
		this.price = price;
		this.discountor = discountor;
	}

	@Override
	public void discount() {
		discountor.discount(this);
	}

	public double getWeight() {
		return weight;
	}
	public void setWeight(double weight) {
		this.weight = weight;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}
	
}
